#make plots for t1
java_index_javanese = rdd_plot_binned_t1(df = data_4, var = java_index_final_bw_10, bw = 10, label = "Javanese Prefentialism Index (SDs)")
java_index_nonjavanese = rdd_plot_binned_t1(df = data_4, var = non_java_index_final_bw_10, bw = 10, label = "Javanese Prefentialism Index (SDs)")
regional_index = rdd_plot_binned_t1(df = data_4, var = regional_index_final_bw_10, bw = 10, label = "Regional Prefentialism Index (SDs)")
religious_index = rdd_plot_binned_t1(df = data_4, var = religious_index_final_bw_10, bw = 10, label = "Religious Intolerance Index (SDs)")
national_index = rdd_plot_binned_t1(df = data_4, var = national_index_final_bw_10, bw = 10, label = "National Identification Index (SDs)")
corruption_index = rdd_plot_binned_t1(df = data_4, var = corruption_index_final_bw_10, bw = 10, label = "Corruption Perception Index (SDs)")

#save plots
ggsave(filename = "./_4_outputs/figures/figure_a6a.png", plot = java_index_javanese, width = 6, height = 4)
ggsave(filename = "./_4_outputs/figures/figure_a6b.png", plot = java_index_nonjavanese, width = 6, height = 4)
ggsave(filename = "./_4_outputs/figures/figure_a6c.png", plot = regional_index, width = 6, height = 4)
ggsave(filename = "./_4_outputs/figures/figure_a6d.png", plot = religious_index, width = 6, height = 4)
ggsave(filename = "./_4_outputs/figures/figure_a6e.png", plot = national_index, width = 6, height = 4)
ggsave(filename = "./_4_outputs/figures/figure_a6f.png", plot = corruption_index, width = 6, height = 4)
